package com.delivery.controller;

import com.delivery.entity.DeliverySlideshow;
import com.delivery.mapper.DeliverySlideshowMapper;
import com.delivery.result.ApiResultList;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/")
@Api(tags = {"indexController"},description = "首页所需接口")
public class indexController {
    @Autowired
    DeliverySlideshowMapper deliverySlideshowMapper;

    @GetMapping("/getSlideshow")
    @ApiOperation(value = "获取轮播图",notes = "无需传参")
    public ApiResultList<DeliverySlideshow> getSlideshow(){
        return  ApiResultList.ok( deliverySlideshowMapper.selectList(null) );
    }


}
